GBML manual / Constants

BTN_UP

The GBA’s UP button, for btn_held/btn_pressed/btn_released.

Syntax

BTN_UP: constant

Description

Names the GBA's UP button, for passing to btn_held, btn_pressed or btn_released - the d-pad's up direction. Prefer btn_dy over checking this directly when what you want is a -1/0/1 axis rather than one specific direction.

Example

if (btn_pressed(BTN_UP)) {
    var fired = true;
}

Checks for a fresh press of UP this frame.

See also: btn_heldbtn_pressedbtn_released